<?php

namespace app\common\validate\news;

use think\Validate;

class News extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'id'=>'require',
        'author_type'=>'require',
        'class_id'=>'require',
        'title'=>'require',
        'content'=>'require',
        'image'=>'require',
        'time'=>'require',
    ];
    /**
     * 提示消息
     */
    protected $message = [
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['title','author_type','author','image','class_id','content','time','is_best','sort','image_small','pingfen','hots','is_top'],
        'edit' => ['id','title','author_type','author','image','class_id','content','time','is_best','sort','image_small','pingfen','hots','is_top'],
    ];
    
}
